﻿@{
    ViewBag.Title = "MM详情";
}
<style>
    .srcimg{
        width:100%
    }
    ul, li {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    li {
        display: inline;
        width:90%
    }
</style>
<script type="text/javascript">
    var arr = (location.search).slice(1);
    var id = decodeURI(arr.split('=')[1]);
    $(function () {
        //获取图片信息
        $.ajax({
            url: '../api/MMView/GetDetailList',
            type: 'GET',
            data: { id: id },
            dataType: 'Json',
            success: function (imgList) {
                var html = "";
                for (var i = 0; i < imgList.length; i++) {
                    html += '<li><img class="srcimg" src="' + imgList[i].src + '" data-original="' + imgList[i].src + '" alt="' + imgList[i].name + '"></li>';
                }
                $('#viewer').html(html);

                $('#viewer').viewer();
            }
        });

    });
</script>

<ul style="width:100%;" id="viewer"></ul>